package cn.joyfulmedia.common.result;

/**
 * Created by loumingshan on 2017/8/30.
 */
public enum  ServiceResultCodeEnum implements ResultCodeInterface {

    TOKEN_ERROR(1001, "token失效，请重新登陆"),
    TOKEN_LENGHTH_ERROR(1000001, "错误的token"),
    SMS_SEND_ERROR(1000002, "短信验证码发送失败"),
    SMS_CODE_ISPIRE(1000003, "验证码失效请重试"),
    SMS_CODE_ERROR(1000004, "验证码错误"),
    NEW_USER_ERROR(1000005, "注册用户失败，请联系管理员!"),
    LOGIN_PASSWORD_ERROR(1000006, "密码错误"),
    PHONE_NOT_EXIST_ERROR(1000007, "手机号码不存在，请重新注册"),
    CREATA_COMPANY_ERROR(1000008, "创建公司失败"),
    GET_UPLOADURL_ERROR(1000009, "获取上传路径失败"),
    EXAM_PAPER_NOT_EXIST(1000010, "试卷不存在"),
    USER_NOT_EXIST_ERROR(1000011, "用户不存在"),
    USER_EXIST_ERROR(1000012, "手机号码已存在"),
    EXAM_PAPER_USER_RELATION_EXIST(1000013, "试卷用户关系已存在"),
    EXAM_PAPER_USER_RELATION_NOT_EXIST(1000014, "试卷用户关系不存在"),
    EXAM_PAPER_NOT_PURCHASE(1000015, "用户未购买该试卷"),
    ACCOUNT_GOLD_COIN_NOT_ENOUGH(1000016, "账户余额不足"),
    BUY_PAPER_FAUL(1000017, "购买试卷失败"),
    UPDATE_ACCOUNT_FAUL(1000018, "更新用户账户失败"),
    BOUGHT_PAPER_ERROR(1000019, "试卷已购买"),
    USER_ANSWER_SUMMARY_ID_ERROR(1000020, "用户当前作答ID错误"),
    SAVE_USER_ANSWER_FAIL_ERROR(1000021, "保存用户答案失败"),
    USER_ANSWER_NOT_EXIST_ERROR(1000022, "用户答案未保存失败"),
    PAPER_ITEM_NOT_EXIST_ERROR(1000023, "试题不存在"),
    SELF_REPORTED_SCORE_ITEM_TYPE_ERROR(1000024, "自评分试题类型错误"),
    DO_NOT_RESUBMIT_ANSWERS_ERROR(1000025, "请勿重复提交答案"),
    PRODUCT_NOT_EXIST_ERROR(1000026, "购买的产品不存在"),
    REQUEST_ALIPAY_ERROR(1000027, "请求支付宝支付对象出现异常"),
    ORDER_NOT_EXIST_ERROR(1000028, "订单不存在")
            ;
    private int resultCode;
    private String message;

    ServiceResultCodeEnum(int resultCode, String message) {
        this.resultCode = resultCode;
        this.message = message;
    }

    @Override
    public int getResultCode() {
        return resultCode;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
